<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<title>Document</title>
	<script src="libs/jquery.js"></script>
</head>
<body>
	<form action="index.html" method="get" enctype="application/x-www-form-urlencoded">
		
		<input type="text" name="username" placeholder="请输入用户名" /><br />
		
		<input type="password" name="password" placeholder="请输入密码" /><br />
		
		
		<button type="submit"> 登录 </button>
	
	</form>
</body>
	<script>
		
		$('form').submit(function(ev){
			
			ev.preventDefault();
			
			console.log('已经阻止');
			
			var data = $(this).serialize();
			
//			$.get('/',data,function(resData){  })
			$.get({
				url:'index.html',
				data:data,
				success:function(resData){
					
				}
			})
		})
	</script>
</html>